import React, { Component, forwardRef } from 'react'
import FormComponent from './FormComponent'
import FormComponent2 from './FormComponent2'

const Wrapper = forwardRef((props, ref) => {
    let Component = null
    switch (props.partId) {
        case 1:
            Component = FormComponent
            break;
        case 2:
            Component = FormComponent2
            break;
        default:
            break;
    }
    return <Component ref={ref} {...props} />

})
export default Wrapper
